/**
*      author: Y_Yao
*      created: 2025-03-01 11:04:46
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 100 + 7;
int dx[4] = {-1,1,-1,1};
int dy[4] = {1,-1,-1,1};
char a[N][N];
int h,w;
struct node
{
    int i,cnt;
};
unordered_map<int,int> ans;
void count(int i,int j)
{
    for(int k = 1;k <= N;k++)
    {
        for(int m = 0;m < 4;m++)
        {
            int x = i + k * dx[m],y = j + k * dy[m];
            if(a[x][y] != '#')
            {
                ans[k-1]++;
                return;
            }
        }
    }
}

void solve()
{
    cin >> h >> w;
    for(int i = 1;i <= h;i++)
        for(int j = 1;j <= w;j++)
            cin >> a[i][j];
    
    for(int i = 1;i <= h;i++)
    {
        for(int j = 1;j <= w;j++)
        {
            if(a[i][j] != '#') continue;
            count(i,j);
        }
    }

    for(int i = 1;i <= min(h,w);i++)
    {
        cout << ans[i] << " ";
    }
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}